/****** Object:  Table [dbo].[passengerService]    ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[passengerService](
	[passengerServiceId] [int] IDENTITY(1,1) NOT NULL,
	[ticketDetailId] [int] NULL,
	[serviceCode] [nchar](10) NULL,
 CONSTRAINT [PK_passengerService] PRIMARY KEY CLUSTERED 
(
	[passengerServiceId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[passengerService]  WITH CHECK ADD  CONSTRAINT [FK_passengerService_passengerService] FOREIGN KEY([ticketDetailId])
REFERENCES [dbo].[ticketDetail] ([ticketDetailId])
GO

ALTER TABLE [dbo].[passengerService] CHECK CONSTRAINT [FK_passengerService_passengerService]
GO

ALTER TABLE [dbo].[passengerService]  WITH CHECK ADD  CONSTRAINT [FK_passengerService_service] FOREIGN KEY([serviceCode])
REFERENCES [dbo].[service] ([serviceCode])
GO

ALTER TABLE [dbo].[passengerService] CHECK CONSTRAINT [FK_passengerService_service]
GO

